function p = predict(Theta1, Theta2, X)
    %   The number of the training examples
    m = size(X, 1);
    %   Compute the h_1
    h1 = sigmoid([ones(m, 1), X] * Theta1');
    %   Compute the h_2
    h2 = sigmoid([ones(m, 1), h1] * Theta2');
    %   Get the max of every row
    [dummy, p] = max(h2, [], 2);
end
